]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
build: Make g-ir-scanner warnings fatal when werror is set
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 16 Jan 2024 12:30:36 +0000 (13:30 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 16 Jan 2024 23:51:13 +0000 (23:51 +0000)
This should help catching problems with introspection in CI.

Adapted from Sebastian Wick's corresponding mutter change
in https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3528.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3121>

src/meson.build
src/st/meson.build
subprojects/shew/src/meson.build

index 748d855a39a6b23e53d3913574b0579e033c5584..422a68d8dd63e9562fd15f9308b4635f0474bb55 100644 (file)
@@ -3,6 +3,13 @@ src_builddir = meson.current_build_dir()
 service_data = configuration_data()
 service_data.set('libexecdir', libexecdir)
 
+introspection_common = {
+  'install_dir_gir': pkgdatadir,
+  'install_dir_typelib': pkglibdir,
+  'install': true,
+  'fatal_warnings': get_option('werror'),
+}
+
 subdir('calendar-server')
 subdir('hotplug-sniffer')
 subdir('st')
@@ -237,9 +244,7 @@ libshell_gir = gnome.generate_gir(libshell,
   namespace: 'Shell',
   includes: libshell_gir_includes,
   extra_args: ['--quiet'],
-  install_dir_gir: pkgdatadir,
-  install_dir_typelib: pkglibdir,
-  install: true
+  kwargs: introspection_common,
 )
 
 executable('gnome-shell', 'main.c',
index c66a432819be0d582b96e2d18508b4d7ad390dc9..8161a6b2b9610c112f3582a802cdb6e167281e1d 100644 (file)
@@ -221,7 +221,5 @@ libst_gir = gnome.generate_gir(libst,
   dependencies: [mutter_dep, gdk_pixbuf_dep],
   include_directories: include_directories('..'),
   extra_args: ['-DST_COMPILATION', '--quiet'],
-  install_dir_gir: pkgdatadir,
-  install_dir_typelib: pkglibdir,
-  install: true
+  kwargs: introspection_common,
 )
index e590a46129387611a4e30796357116ff5e8bcace..22d9735b2df9a020189afdb5ca7093c9b861cced 100644 (file)
@@ -23,6 +23,7 @@ libshew_gir = gnome.generate_gir(libshew,
   namespace: 'Shew',
   includes: ['Gdk-4.0', 'Gtk-4.0'],
   extra_args: ['--quiet'],
+  fatal_warnings: get_option('werror'),
   install_dir_gir: girdir,
   install_dir_typelib: typelibdir,
   install: true,